package com.ruoyi.web.controller.business;


import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.yanjing.service.YearSafeStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.ruoyi.common.core.domain.AjaxResult.success;

@RestController
@RequestMapping("/yanjing/yearSafeStatistics")
public class YearSafeStatisticsController {

    @Autowired
    private YearSafeStatisticsService yearSafeStatisticsService;

    /**
     * 获取年度安全数据统计信息
     */
    @GetMapping(value = "/getYearSafeStatisticsData")
    public AjaxResult getYearSafeStatisticsData()
    {
        return success(yearSafeStatisticsService.getYearSafeStatisticsData());
    }


    @GetMapping(value = "/getSafetyScenarioStatisticsData")
    public AjaxResult getSafetyScenarioStatisticsData()
    {
        return success(yearSafeStatisticsService.getSafetyScenarioStatisticsData());
    }


}
